import request from '@/utils/request'

// 获取段数据
export function listDept() {
  return request({
    url: '/psim/select/listDept',
    method: 'get'
  })
}

// 供电报1查询
export function listGdb1(params) {
  return request({
    url: '/psim/gdb1/listGdb1',
    method: 'get',
    params: params
  })
}

// 供电报2查询
export function listGdb2(params) {
  return request({
    url: '/psim/gdb2/listGdb2',
    method: 'get',
    params: params
  })
}

// 供电报3查询
export function listGdb3(params) {
  return request({
    url: '/psim/gdb3/listGdb3',
    method: 'get',
    params: params
  })
}

// 供电报4查询
export function listGdb4(params) {
  return request({
    url: '/psim/gdb4/listGdb4',
    method: 'get',
    params: params
  })
}

// 供电报5查询
export function listGdb5(params) {
  return request({
    url: '/psim/gdb5/listGdb5',
    method: 'get',
    params: params
  })
}

// 供电报1上报
export function saveOrUpdateGdb1(query) {
  return request({
    url: '/psim/gdb1/saveOrUpdateGdb1',
    method: 'POST',
    data: query
  })
}

// 供电报2上报
export function saveOrUpdateGdb2(query) {
  return request({
    url: '/psim/gdb2/saveOrUpdateGdb2',
    method: 'POST',
    data: query
  })
}

// 供电报3上报
export function saveOrUpdateGdb3(query) {
  return request({
    url: '/psim/gdb3/saveOrUpdateGdb3',
    method: 'POST',
    data: query
  })
}

// 供电报4上报
export function saveOrUpdateGdb4(query) {
  return request({
    url: '/psim/gdb4/saveOrUpdateGdb4',
    method: 'POST',
    data: query
  })
}

// 供电报5上报
export function saveOrUpdateGdb5(query) {
  return request({
    url: '/psim/gdb5/saveOrUpdateGdb5',
    method: 'POST',
    data: query
  })
}

// 导出数据1
export function excelDownLoadGdb1(params) {
  return request({
    url: '/psim/gdb1/excelDownLoadGdb1',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 导出数据2
export function excelDownLoadGdb2(params) {
  return request({
    url: '/psim/gdb2/excelDownLoadGdb2',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 导出数据3
export function excelDownLoadGdb3(params) {
  return request({
    url: '/psim/gdb3/excelDownLoadGdb3',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 导出数据4
export function excelDownLoadGdb4(params) {
  return request({
    url: '/psim/gdb4/excelDownLoadGdb4',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 导出数据5
export function excelDownLoadGdb5(params) {
  return request({
    url: '/psim/gdb5/excelDownLoadGdb5',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}
